Skip to content

fix(create): normalize target directory to forward slashes on Windows#971

Merged
Brooooooklyn merged 1 commit intomainfrom
fix-938
Mar 17, 2026
Merged

fix(create): normalize target directory to forward slashes on Windows#971
Brooooooklyn merged 1 commit intomainfrom
fix-938

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 16, 2026

On Windows, path.join and path.normalize produce backslash-separated
paths (e.g., packages\core). When passed as CLI arguments to external
commands like create-vite, the backslash gets lost, creating
packagescore instead of packages/core.

Normalize all relative target directory paths to forward slashes at the
source: in formatTargetDir() and in bin.ts path joins.

Closes #938

On Windows, `path.join` and `path.normalize` produce backslash-separated
paths (e.g., `packages\core`). When passed as CLI arguments to external
commands like `create-vite`, the backslash gets lost, creating
`packagescore` instead of `packages/core`.

Normalize all relative target directory paths to forward slashes at the
source: in `formatTargetDir()` and in `bin.ts` path joins.

Closes #938
@netlify
Copy link

netlify bot commented Mar 16, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 13a84ac
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69b812b37844b600083d5a58

Copy link
Member Author

fengmk2 commented Mar 16, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 16, 2026
@fengmk2 fengmk2 marked this pull request as ready for review March 16, 2026 14:25
Copy link
Member

Brooooooklyn commented Mar 17, 2026

Merge activity

  • Mar 17, 1:51 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 17, 1:51 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn Brooooooklyn merged commit 73b7a01 into main Mar 17, 2026
22 checks passed
@Brooooooklyn Brooooooklyn deleted the fix-938 branch March 17, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] vp create vite:application fails with scoped package names and missing directories

3 participants